#ifndef CHNWIDGET_H
#define CHNWIDGET_H

#include <QtGui>
#include <ui_chnwidget.h>
#include <bean.h>


class ChnStandardItemModel:public QStandardItemModel
{
    Q_OBJECT
public:
    ChnStandardItemModel(QObject * parent=0);
    virtual ~ ChnStandardItemModel();
    QVariant data(const QModelIndex & index,int role=Qt::DisplayRole) const;
    void setDatas(QList<DEV> datas);
    bool first;
private:
    void initProperty();
    QList<DEV> datas;
};



class ChnWidget : public QWidget,public Ui::chnwidget
{
    Q_OBJECT
public:
    explicit ChnWidget(QWidget *parent = 0);
    void refreshData();

public:
    ChnStandardItemModel *chnModel1,*chnModel2;

signals:
    void mystep(int index);

public slots:
    void devNumChanged1(const QModelIndex &topLeft, const QModelIndex &bottomRight);
    void devNumChanged2(const QModelIndex &topLeft, const QModelIndex &bottomRight);
    void next();
    void back();


};

#endif // CHNWIDGET_H
